package sil.mod.factory;

import iface.Modificator;

/**
 * Factory class which creates new {@link Modificator} objects.
 * 
 * @author Marcus Lindner
 * @author Joana Otetelisanu
 * 
 */
public enum ModifierFactory {
    ;
    /**
     * Creates a new {@link Modificator} object which has the passed modificator
     * and has a return value for the method {@link Object#toString()} the
     * passed text.
     * 
     * @param modifier modifier
     * @param text return text
     * @return a new {@link Modificator}
     */
    public static Modificator createModificator(final int modifier,
	    final String text) {
	return new Modificator() {

	    @Override
	    public int getModificator() {
		return modifier;
	    }

	    @Override
	    public String toString() {
		return text;
	    }
	};
    }
}
